//
//  BHFunAddTempModel.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/8/16.
//

import UIKit

class BHFunAddTempModel: NSObject {

    var name: String = ""
    var typeOneValue: String = "" // 一级运动类型label
    var typeTwoValue: String = "" // 二级运动类型label
    var remarks: String = "" // 分类补充
    var startTime: String = "" // 开始时间
    var signupEndTime: String = "" // 报名结束时间
    var venueId: String = "" // 场馆id  placeType为0时必传
    var provinceId: String = "" // 省code(不是id)  placeType为1时必传
    var cityId: String = "" // 市code  placeType为1时必传
    var regionId: String = "" //区code  placeType为1时必传
    var place: String = "" // 地址  placeType为1时必传
    var address: String = "" // 详细地址 placeType为1时必传
    var log: String = "" // 自定义地址必传
    var lat: String = "" // 自定义地址必传
    
    var longitude: String = ""
    var latitude: String = ""
    var price: String = "" // ifFee 为 1时必传
    var contactNumber: String = "" //联系电话
    var introduce: String = ""
    var limitPerson: String = "" // 限制人数

    var urlList: [BHImageOrVideoModel] = []
    
    
    
    
    var placeType: Int = 0 // 地点类型 0场馆 1自定义
    var ifFee: Int = 0 // 是否需要报名费 1是 0否
    
    
    var typeShowName: String = ""
    
    var relateModel: BHFunPublishRelateModel?
    
    
    // 只有是修改的时候才会调用
    func parseDic(_ dic: [String:Any])  {
        self.name = BHJsonTool.decodeStringFromDic(dic: dic, key: "name")
        self.typeOneValue = BHJsonTool.decodeStringFromDic(dic: dic, key: "typeOneValue")
        self.typeTwoValue = BHJsonTool.decodeStringFromDic(dic: dic, key: "typeTwoValue")
        self.startTime = BHJsonTool.decodeStringFromDic(dic: dic, key: "beginTime")
        self.signupEndTime = BHJsonTool.decodeStringFromDic(dic: dic, key: "signupEndTime")
        self.venueId = BHJsonTool.decodeStringFromDic(dic: dic, key: "venueId")

    }
    
}
